﻿/*
Copyright © 2010 François Karman

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

See <license.txt> for the complete license of the software.
*/

using System;

namespace MSBuild.Mercurial
{
    /// <summary>
    /// Update a repository to a specific revision.
    /// </summary>
    [Command("update")]
    public class HgUpdate : AbstractHgTask
    {
        /// <summary>
        /// Gets or sets a value indicating whether the uncommitted changes
        /// will be discarded during the update.
        /// </summary>
        [Parameter("-C")]
        public bool Clean { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether the execution should
        /// failed if the repository have uncommitted changes.
        /// </summary>
        [Parameter("-c")]
        public bool Check { get; set; }

        /// <summary>
        /// Gets or sets the reference date of the change set to use for the update.
        /// </summary>
        [Parameter("-d")]
        public DateTime? Date { get; set; }

        /// <summary>
        /// Gets or sets the revision use for the update.
        /// </summary>
        [Parameter("-r")]
        public string Revision { get; set; }
    }
}
